package com.robert.cool.weather.di.module;

import android.widget.ArrayAdapter;

import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.di.scope.FragmentScope;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

import com.robert.cool.weather.mvp.contract.ChooseAreaContract;
import com.robert.cool.weather.mvp.model.ChooseAreaModel;

import java.util.ArrayList;
import java.util.List;


/**
 * ================================================
 * Description:
 * <p>
 * Created by MVPArmsTemplate on 04/22/2020 23:10
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
 * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
 * ================================================
 */
@Module
public abstract class ChooseAreaModule {

    @Binds
    abstract ChooseAreaContract.Model bindChooseAreaModel(ChooseAreaModel model);

    @FragmentScope
    @Provides
    static ArrayAdapter<String> provideAdapter(ChooseAreaContract.View view,List<String> list){
        return new ArrayAdapter<String>(view.getContext(),android.R.layout.simple_list_item_1,list);
    }

    @FragmentScope
    @Provides
    static List<String> provideStringList(){
        return new ArrayList<>();
    }
}